<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="../common/js/jquery-1.4.2.min.js" language="JavaScript"></script>
<script src="../common/js/jquery.validate.min.js" language="JavaScript"></script>
<style>
body{text-align:center}
dl{margin:0 auto;}
dt,dd{float:left;width:45%;margin:0;padding:0;}
dt{text-align:right}
dd{text-align:left}
</style>
</head>
<script>
/*
    $.validator.setDefaults({
      submitHandler: function() {
         alert("submitted! (skipping validation for cancel button)");
      }
    });
*/
  $(document).ready(function(){
    $("#addForm").validate();
  });
</script>
<body>

<?php
$form = new Zend_Form;
foreach( $this->model->result as $key => $value ){
        if( $value instanceof Zend_Form_Element ) $form->addElement($value);
}
$form->setName('addForm')
     ->setAction('/admin/index/add')
     ->setMethod('post')
     ->addElement('submit', 'login', array('label' => 'Login'));
echo $form;
?>
</body>
</html>